/*! click statistics */
var Clickstat = {
    address: "//probe.3g.fang.com/Prick.do?",
    prefix: "",
    blocks: null,
    inArray: function(a, b) {
        if (a && void 0 !== b) {
            for (var c = 0; c < a.length; c++)
                if (b == a[c]) return !0;
            return !1
        }
        return !1
    },
    eventAdd: function(a, b, c) { document.addEventListener ? a.addEventListener(b, c, !1) : document.attachEvent && a.attachEvent("on" + b, c) },
    prepareUrl: function(a, b) { var c = a + "aip=1&aa=1&at=1&fst=3&fet=0&fn=fileclickmap&dn=clickmap&cst=`&data="; for (var d in b) c += "prefix" == d ? b[d] : "`" + b[d]; return c += "&random=" + Math.random() },
    clickHandler: function(a) {
        a = a || window.event;
        var b, c = a.target || a.srcElement,
            d = c;
        if ("A" == d.tagName || "INPUT" == d.tagName || "OBJECT" == d.tagName || "SELECT" == d.tagName || "BUTTON" == d.tagName || "LI" == d.tagName || "P" == d.tagName) b = d;
        else
            for (; d = d.parentNode;)
                if ("A" == d.tagName || "INPUT" == d.tagName || "OBJECT" == d.tagName || "SELECT" == d.tagName || "BUTTON" == d.tagName) { b = d; break } if (b) {
            var e;
            if ((e = c.getBoundingClientRect ? c.getBoundingClientRect() : c.parentNode.getBoundingClientRect()) && e.left < a.clientX && a.clientX < e.right && e.top < a.clientY && a.clientY < e.bottom) {
                var f = "",
                    d = b;
                if ("" != d.id && (d.id.indexOf(this.prefix) > -1 || this.inArray(this.blocks, d.id))) f = d.id;
                else if ("LI" == d.tagName || "P" == d.tagName)
                    for (var g = d.tagName.toLowerCase();
                        (d = d.parentNode) && d.tagName;) { if (d.id && (d.id.indexOf(this.prefix) > -1 && d.getAttribute("cig") == g || this.inArray(this.blocks, d.id))) { f = d.id; break } if (d.id && (d.id.indexOf(this.prefix) > -1 && "cig" == d.getAttribute("cig") || this.inArray(this.blocks, d.id))) { f = d.id; break } } else
                        for (; d = d.parentNode;)
                            if (d.id && (d.id.indexOf(this.prefix) > -1 || this.inArray(this.blocks, d.id))) { f = d.id; break }
                if ("" != f) {
                    var h = "A" == b.tagName ? b.href : "",
                        i = "CSS1Compat" == document.compatMode ? document.documentElement : document.body,
                        j = this.prefix;
                    j.length > 0 && "_" == j.charAt(j.length - 1) && (j = j.substring(0, j.length - 1));
                    var k = Clickstat.getUVInfo(),
                        l = { prefix: j, hostname: location.hostname, url: escape(location.href), div: f, href: escape(h), width: screen.width, x: a.clientX + i.scrollLeft, y: a.clientY + i.scrollTop, g: k.g || "g", u: k.u || "u", i: k.i || "i" };
                    void 0 !== this.secDomain && this.secDomain && (l.folder = this.secDomain + j);
                    var m = this.prepareUrl(this.address, l),
                        n = document.createElement("img");
                    return n.style.height = 0, n.style.width = 0, n.src = m, n.style.display = "none", document.body.appendChild(n), !0
                }
            }
        }
    },
    batchEvent: function() { arguments.length < 1 || (this.prefix = arguments[0], void 0 !== arguments[1] && (this.secDomain = arguments[1]), this.eventAdd(document, "mousedown", function(a) { Clickstat.clickHandler(a) })) },
    blocksEvent: function() {
        if (!(arguments.length < 2)) {
            var a = arguments[0];
            this.prefix = arguments[1], void 0 !== arguments[2] && (this.secDomain = arguments[2]), this.blocks = [];
            for (var b = 0; b < a.length; b++) {
                var c = a[b],
                    d = document.getElementById(c);
                if (d) {
                    this.blocks.push(c);
                    var e = d.getElementsByTagName("a"),
                        f = d.tagName.toLowerCase();
                    "a" != f && "input" != f && "li" != f && "object" != f && "select" != f || Clickstat.eventAdd(d, "mousedown", function(a) { return Clickstat.clickHandler(a), !1 });
                    for (var g = 0; g < e.length; g++) Clickstat.eventAdd(e[g], "mousedown", function(a) { return Clickstat.clickHandler(a), !1 })
                }
            }
        }
    },
    mixedEvent: function() {
        if (!(arguments.length < 2)) {
            var a = arguments[0];
            this.prefix = arguments[1], void 0 !== arguments[2] && (this.secDomain = arguments[2]), this.blocks = [];
            for (var b = 0; b < a.length; b++) {
                var c = a[b];
                document.getElementById(c) && this.blocks.push(c)
            }
            this.eventAdd(document, "mousedown", function(a) { Clickstat.clickHandler(a) })
        }
    },
    getUVInfo: function() {
        var a = { tag: "false", g: "g", u: "u", i: "i" },
            b = 0;
        if ("undefined" == typeof SFUV && "undefined" == typeof SFUVForWapAndM && "undefined" == typeof SFUVForM) return a;
        if ("undefined" == typeof SFUV && (b = 1, "undefined" != typeof SFUVForWapAndM && (SFUV = SFUVForWapAndM), "undefined" == typeof SFUVForWapAndM && (SFUV = SFUVForM)), "undefined" == typeof SFUV) return a;
        if (void 0 === SFUV.getcookie) return a;
        try {
            0 == b ? (a.g = SFUV.getcookie(SFUV.G_GlobalCname), a.u = SFUV.getcookie(SFUV.G_UniqueCname).split("*")[0]) : (a.g = SFUV.getcookie("global_cookie"), a.u = SFUV.getcookie("unique_cookie").split("*")[0]);
            var c = [];
            c.isso_login = SFUV.getcookie("isso_login"), c.isso_uuid = SFUV.getcookie("isso_uuid"), c.isso_uuid && (a.i = "100~" + c.isso_uuid + "~" + c.isso_login), a.tag = "true"
        } catch (d) { a.tag = "error" }
        return a.g = "" == a.g ? "g" : a.g, a.u = "" == a.u ? "u" : a.u, a.i = "" == a.i ? "i" : a.i, a
    }
};